<?php if(in_category('1338')) {
    include '/home/silicons/public_html/wp-content/themes/woostore/single-reference-project.php';
} else { ?>

<?php get_header(); ?>
<?php global $woo_options; ?>

<?php if (in_category('14')) { ?>
    <style>
        .yarpp-related { display:none; }
    </style>
<?php } ?>
       
    <div id="content" class="col-full">
		<div id="main" class="col-left">
		           
		<?php if ( $woo_options[ 'woo_breadcrumbs_show' ] == 'true' ) { ?>
			<?php woo_breadcrumbs(); ?> 
		<?php } ?>  

        <?php if (have_posts()) : $count = 0; ?>
        <?php while (have_posts()) : the_post(); $count++; ?>
        
			<div <?php post_class(); ?>>

				<?php // echo woo_embed( 'width=580' ); ?>
                <?php if ( $woo_options[ 'woo_thumb_single' ] == "true" && !woo_embed( '')) woo_image( 'width='.$woo_options[ 'woo_single_w' ].'&height='.$woo_options[ 'woo_single_h' ].'&class=thumbnail '.$woo_options[ 'woo_thumb_single_align' ]); ?>

                <h1 class="title"><?php the_title(); ?></h1>

                <?php if (in_category('14')) { ?>
                    <?php if(get_field('pressreleasedate') != '') {
                        $pressdate = get_field('pressreleasedate');
                    } else {
                        $pressdate = get_the_date();
                    } ?>
                    <p>FOR IMMEDIATE RELEASE | <?php echo $pressdate; ?></p>
                <?php } else { ?>
                    <?php woo_post_meta(); ?>
                <?php } ?>
                    
                <?php include '/home/silicons/public_html/wp-content/themes/woostore/page-include-social-block.php'; ?>
                
                <div class="entry">
                    
                        <?php if (in_category('14')) { ?>
                            <?php if (get_field('productFeaturedImage') != '') { ?>
                                <?php $mainimage = get_field('productFeaturedImage'); ?>
                            <?php } elseif (has_post_thumbnail( 'single-post-thumbnail' )) { ?>
                                <?php $mainimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
                            <?php } else { ?>
                                <?php $mainimage = "/../wp-content/uploads/2013/03/siliconsolar-logo.jpg"; ?>
                            <?php } ?>
                            <div style="width:312px;float:right;margin:0px;margin-left:20px;margin-bottom:20px;border-bottom:#cccccc 1px solid;padding-bottom:10px;">
                                <img src="<?php echo $mainimage; ?>" alt="<?php the_title(); ?>" width="300px" height="auto" style="margin-bottom:10px;" />
                                <p style="font-style:italic;color:#666666;text-align:center;"><?php the_title(); ?></p>
                            </div>
                        <?php } ?>
                    
                	<?php the_content(); ?>
                    <div style="width:100%;height:0px;clear:both;"></div>
                    
                    <?php // Include The Press Contact Area - Matt B - Apr 2013
                        if (in_category('14')) {
                            include '/home/silicons/public_html/wp-content/themes/woostore/post-include-press-connect.php';
                    } ?>
                    
                    <?php // Include The Contact Block - If Option Is Turned On - Matt B - Apr 2013
                            if (get_field('showcontactblock')) {
                                echo do_shortcode('[contact]');
                    } ?>
                    
                    <?php include 'page-include-why-shop-block.php'; ?>
                    
					<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); ?>
				</div>
									
				<?php the_tags( '<p class="tags">'.__( 'Tags: ', 'woothemes' ), ', ', '</p>' ); ?>
                                
            </div><!-- .post -->

				<?php woo_subscribe_connect(); ?>

	        <div id="post-entries">
	            <div class="nav-prev fl"><?php previous_post_link( '%link', '<span class="meta-nav">&larr;</span> %title' ) ?></div>
	            <div class="nav-next fr"><?php next_post_link( '%link', '%title <span class="meta-nav">&rarr;</span>' ) ?></div>
	            <div class="fix"></div>
	        </div><!-- #post-entries -->
                                                
		<?php endwhile; else: ?>
			<div <?php post_class(); ?>>
            	<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ) ?></p>
			</div><!-- .post -->             
       	<?php endif; ?>  
        
		</div><!-- #main -->

        <?php get_sidebar(); ?>

    </div><!-- #content -->
		
<?php get_footer(); ?>

<?php } ?>